import {
  IChildrenProps,
  ITableColProp,
  ITableConfig,
  ITreeProps
} from '@/base-ui/table/src/types'

export const propList: ITableColProp[] = [
  {
    prop: 'name',
    label: '菜单名称',
    minWidth: '80'
  },
  {
    prop: 'type',
    label: '类型',
    minWidth: '60'
  },
  {
    prop: 'url',
    label: '菜单路径',
    minWidth: '80'
  },
  {
    prop: 'icon',
    label: '菜单图标',
    minWidth: '60'
  },
  {
    prop: 'createAt',
    label: '创建时间',
    minWidth: '120',
    slotName: 'createAt'
  },
  {
    prop: 'updateAt',
    label: '更新时间',
    minWidth: '120',
    slotName: 'updateAt'
  },
  {
    label: '操作',
    minWidth: '100',
    slotName: 'handle'
  }
]

export const treeProps: ITreeProps = {
  children: 'children'
}

export const childrenProps: IChildrenProps = {
  rowKey: 'id',
  treeProps: treeProps
}

export const contentConfig: ITableConfig = {
  title: '菜单列表',
  isShowIndex: false,
  isShowSelection: false,
  propList: propList,
  childrenProps: childrenProps,
  isShowFooter: false
}
